import 'package:flutter/material.dart';
import 'package:hkzf_flutter/pages/profile/functionButton/index.dart';
import 'package:hkzf_flutter/pages/profile/advertisement/index.dart';
import 'package:hkzf_flutter/pages/profile/header/index.dart';
import 'package:hkzf_flutter/widgets/information/index.dart';

class ProfilePage extends StatelessWidget {
  const ProfilePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('个人中心'),
        actions: [
          IconButton(
            icon: Icon(Icons.settings),
            onPressed: () {
              Navigator.pushNamed(context, '/setting');
            },
          ),
        ],
        // centerTitle:true,// 标题居中
        backgroundColor: Colors.green,
        elevation: 0,// 控制应用栏的阴影高度（Z 轴高度），从而影响视觉上的层次感。值越高，阴影越明显，组件看起来就越“浮起”。
      ),
      body: ListView(
        children: [
          const ProfileHeader(),
          const FunctionButtonPanel(),
          const AdvertisementPanel(),
          InformationPanel(showTitle: true,)
        ],
      ),
    );
  }
}